home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 006a / mpp.zip / INITPS.GL < prev    next >
Text File  |  1991-06-21  |  4KB  |  223 lines

  1. %! PostScript
  2.  
  3. clear
  4. initgraphics
  5.  
  6. /inch { 72 mul } def
  7.  
  8. /LWidth .001 def
  9. /SymWidth .006 def
  10.  
  11. /LeftCF 0 def
  12. /RightCF 1 def
  13. /LowerCF 0 def
  14. /UpperCF 1 def
  15.  
  16. /LTick .02 def
  17. /STick .012 def
  18.  
  19. /Scaleby 3.5 def
  20. /Transby 2 def
  21. /PageLen 11 def
  22. /LabelSize 10 72 div def
  23. /TextSize 12 72 div def
  24. /NumSize 8 72 div Scaleby div def
  25.  
  26. /LabelFont /Helvetica findfont def
  27. /TextFont /Helvetica findfont def
  28. /NumFont /Helvetica findfont def
  29.  
  30. /rectangle % Left Right Lower Upper
  31.   { /Upper exch def
  32.     /Lower exch def
  33.     /Right exch def
  34.     /Left exch def
  35.     Left Lower moveto
  36.     Right Lower lineto
  37.     Right Upper lineto
  38.     Left Upper lineto
  39.     closepath }
  40. def
  41.  
  42. /centertext % horiz left right string
  43.   { /Str exch def
  44.     /R exch def
  45.     /L exch def
  46.     /H exch def
  47.     Str stringwidth pop
  48.     2 div
  49.     R L sub 2 div
  50.     exch sub
  51.     L add
  52.     H moveto
  53.     Str show }
  54. def
  55.  
  56. /uptick % X length
  57.   { exch LowerCF moveto
  58.     0 exch rlineto
  59.     stroke}
  60. def
  61.  
  62. /downtick % X length
  63.   { exch UpperCF moveto
  64.     0 exch neg rlineto
  65.     stroke}
  66. def
  67.  
  68. /lefttick % X length
  69.   { exch LeftCF exch moveto
  70.     0 rlineto
  71.     stroke}
  72. def
  73.  
  74. /righttick % X length
  75.   { exch RightCF exch moveto
  76.     neg 0 rlineto
  77.     stroke}
  78. def
  79.  
  80. /xticks % offset spacing length
  81.   { /L exch def
  82.     /Sp exch def
  83.     /Ofs exch def
  84.     Ofs Sp RightCF {dup L uptick L downtick} for }
  85. def
  86.  
  87. /yticks % offset spacing length
  88.   { /L exch def
  89.     /Sp exch def
  90.     /Ofs exch def
  91.     Ofs Sp RightCF {dup L lefttick L righttick} for }
  92. def
  93.  
  94. /downlabel % xpos ypos size offset string
  95.   { /Str exch def
  96.     /Ofs exch def
  97.     /Size exch def
  98.     /Y exch def
  99.     /X exch def
  100.     /Y Y Ofs sub def
  101.     Str stringwidth pop
  102.     2 div
  103.     X exch sub
  104.     Y moveto
  105.     Str show }
  106. def
  107.  
  108. /uplabel % xpos ypos size offset string
  109.   { /Str exch def
  110.     /Ofs exch def
  111.     /Size exch def
  112.     /Y exch def
  113.     /X exch def
  114.     /Y Y Ofs add def
  115.     Str stringwidth pop
  116.     2 div
  117.     X exch sub
  118.     Y moveto
  119.     Str show }
  120. def
  121.  
  122. /leftlabel % xpos ypos size offset string
  123.   { /Str exch def
  124.     /Ofs exch def
  125.     /Size exch def
  126.     /Y exch def
  127.     /X exch def
  128.     /Y Y Size 3 div sub def
  129.     Str stringwidth pop
  130.     X Ofs sub exch sub
  131.     Y moveto
  132.     Str show }
  133. def
  134.  
  135. /rightlabel % xpos ypos size offset string
  136.   { /Str exch def
  137.     /Ofs exch def
  138.     /Size exch def
  139.     /Y exch def
  140.     /X exch def
  141.     /Y Y Size 3 div sub def
  142.     X Ofs add Y moveto
  143.     Str show }
  144. def
  145.  
  146. /drawdiamond
  147.   { SymWidth 0 rmoveto
  148.     SymWidth neg SymWidth neg rlineto
  149.     SymWidth neg SymWidth rlineto
  150.     SymWidth SymWidth rlineto
  151.     closepath
  152.     SymWidth neg 0 rmoveto }
  153. def
  154.  
  155. /drawbox
  156.   { /DSym SymWidth 2 mul def
  157.     SymWidth SymWidth rmoveto
  158.     0 DSym neg rlineto
  159.     DSym neg 0 rlineto
  160.     0 DSym rlineto
  161.     closepath
  162.     SymWidth neg SymWidth neg rmoveto }
  163. def
  164.  
  165. /drawtriangle
  166.   { /DSym SymWidth 2 mul def
  167.     0 SymWidth rmoveto
  168.     SymWidth DSym neg rlineto
  169.     DSym neg 0 rlineto
  170.     closepath
  171.     0 SymWidth neg rmoveto }
  172. def
  173.  
  174. /drawdot
  175.   { /DSym LWidth 2 mul def
  176.     LWidth LWidth rmoveto
  177.     0 DSym neg rlineto
  178.     DSym neg 0 rlineto
  179.     0 DSym rlineto
  180.     closepath
  181.     LWidth neg LWidth neg rmoveto }
  182. def
  183.  
  184. /drawplus
  185.   { /DSym SymWidth 2 mul def
  186.     SymWidth neg 0 rmoveto
  187.     DSym 0 rlineto
  188.     SymWidth neg SymWidth rmoveto
  189.     0 DSym neg rlineto
  190.     0 SymWidth rmoveto }
  191. def
  192.  
  193. /drawx
  194.   { /DSym SymWidth 2 mul def
  195.     SymWidth neg SymWidth neg rmoveto
  196.     DSym DSym rlineto
  197.     DSym neg 0 rmoveto
  198.     DSym DSym neg rlineto
  199.     SymWidth neg SymWidth rmoveto }
  200. def
  201.  
  202. /drawy
  203.   { /DSym SymWidth 2 mul def
  204.     0 SymWidth neg rlineto
  205.     SymWidth DSym rmoveto
  206.     SymWidth neg SymWidth neg rlineto
  207.     SymWidth neg SymWidth rlineto
  208.     SymWidth SymWidth neg rmoveto }
  209. def
  210.  
  211. /drawstar
  212.   { /DSym SymWidth 2 mul def
  213.     SymWidth neg SymWidth neg rmoveto
  214.     DSym DSym rlineto
  215.     DSym neg 0 rmoveto
  216.     DSym DSym neg rlineto
  217.     SymWidth neg 0 rmoveto
  218.     0 DSym rlineto
  219.     0 SymWidth neg rmoveto }
  220. def
  221.  
  222. LWidth setlinewidth
  223.